﻿using Domain.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class EMRConfiger : IEntityTypeConfiguration<EMR>
    {
        public void Configure(EntityTypeBuilder<EMR> builder)
        {
            builder.ToTable(nameof(EMR));
            builder.HasKey(c => c.MreId);
            builder.Property(c => c.FirstKindId).IsRequired(false);
            builder.Property(c => c.FirstKindName).IsRequired(false);
            builder.Property(c => c.SecondKindId).IsRequired(false);
            builder.Property(c => c.SecondKindName).IsRequired(false);
            builder.Property(c => c.ThirdKindId).IsRequired(false);
            builder.Property(c => c.ThirdKindName).IsRequired(false);
            builder.Property(c => c.MajorId).IsRequired(false);
            builder.Property(c => c.MajorName).IsRequired(false);
            builder.Property(c => c.HumanAmount).IsRequired(false);
            builder.Property(c => c.EngageType).IsRequired(false);
            builder.Property(c => c.Deadline).IsRequired(false);
            builder.Property(c => c.Register).IsRequired(false);
            builder.Property(c => c.Changer).IsRequired(false);
            builder.Property(c => c.RegistTime).IsRequired(false);
            builder.Property(c => c.ChangeTime).IsRequired(false);
            builder.Property(c => c.MajorDescribe).IsRequired(false);
            builder.Property(c => c.EngageRequired).IsRequired(false);
        }
    }
}
